//**********************************************************
//    File Name: Chart.cs
//    Author: Team Motif
//    Date Created : 04/13/2007
//    Current Owner: Team Motif 
//                                                                            
//    Purpose: 
//    This class provides the functions needed to create, update, access, and delete a 
//    Client Charts
//
//	  Copyright 2007
//**********************************************************

using System;
using System.Collections.Generic;
using System.Text;

namespace Library
{
    public class Chart
    {
        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Default Constructor
        /// -------------------------------------------------------------------------------
        /// </summary>
        public Chart()
        {
            mCreateAuthor = "";
            mDateCreated = new DateTime();
            mDateCreated = DateTime.UtcNow;
        }


        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Alternate Construct passing the name of the author
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <param name="author"></param>
        public Chart(String author)
        {
            mCreateAuthor = author;
            mDateCreated = new DateTime();
            mDateCreated = DateTime.UtcNow;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Sets the chart summany and author
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <param name="summary"></param>
        /// <param name="author"></param>
        public void SetChartData(String summary, String author)
        {
            mChartData = summary;
            mModifyAuthor = author;
            mDateModified = new DateTime();
            mDateModified = DateTime.UtcNow;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Sets the creator author for the chart
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <param name="author"></param>
        public void SetCreatorAuthor(String author)
        {
            mCreateAuthor = author;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Sets the modifier author for the Chart
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <param name="author"></param>
        public void SetModifyAuthor(String author)
        {
            mModifyAuthor = author;
        }


        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Gets the last modification time for this chart
        /// -------------------------------------------------------------------------------
        /// </summary>
        public DateTime GetTimeLastModified()
        {
            return mDateModified;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Return the Author
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <returns>String</returns>
        public String GetCreatorAuthor()
        {
            return mCreateAuthor;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Returns the Author who last modified this chart
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <returns>String</returns>
        public String GetModifyAuthor()
        {
            return mModifyAuthor;
        }

        
        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Returns the actual chart data
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <returns></returns>
        public String GetChartData()
        {
            return mChartData;
        }

        /// <summary>
        /// -------------------------------------------------------------------------------
        /// Gets the creation time for this chart
        /// -------------------------------------------------------------------------------
        /// </summary>
        /// <returns></returns>
        public DateTime GetTimeCreated()
        {
            return mDateCreated;
        }

        // -------------------------------------------------------------------------------
        // Private data region
        // -------------------------------------------------------------------------------
        String mChartData;
        String mCreateAuthor;
        String mModifyAuthor;
        DateTime mDateCreated;
        DateTime mDateModified;
    }
}
